libxl: implement libxl__xs_mknod using XS_WRITE rather than XS_MKDIR
authorPaul Durrant <paul.durrant@citrix.com>
Wed, 25 Nov 2015 14:51:00 +0000 (14:51 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 1 Dec 2015 12:02:13 +0000 (12:02 +0000)
commit53c3d93af03d13e7e2931a352211da4824bd44ed
tree812e77d297752278d21a1ede09eb7416f77ed530
parentb6b5e7cbb881259db387c95da32ac695efa992e1
libxl: implement libxl__xs_mknod using XS_WRITE rather than XS_MKDIR

This patch modifies the implentation of libxl__xs_mknod() to use XS_WRITE
rather than XS_MKDIR since passing an empty value to the former will
ensure that the path is both existent and empty upon return, rather than
merely existent. The function return type is also changed to a libxl
error value rather than a boolean, it's declaration is accordingly moved
into the 'checked' section in libxl_internal.h, and a comment is added to
clarify its semantics.

This patch also contains as small whitespace fix in the definition of
libxl__xs_mknod() and the addition of 'ok' to CODING_STYLE as the
canonical variable name for holding return values from boolean functions.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/CODING_STYLE
tools/libxl/libxl_internal.h
tools/libxl/libxl_xshelp.c